-
Notifications
You must be signed in to change notification settings - Fork 1k
Tidying up clock config of H5. #2695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Ah, I'm stupid. |
Hi @dojyorin |
@fpistm |
For example, by organizing things in this PR, it will be easier to visually distinguish the differences in a diff editor, making it easier to add new variants and apply patches. I'm currently developing several custom H5 boards, and when I was referencing the code of existing variants to add a variant, I was a little confused by the subtle variations in numbers and notation. I submitted a PR to reduce experiences like this. |
@fpistm I'll fix the corrections this weekend. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Honestly, I understand your point to change config order will help ton compare anyway changing several values just to have less difference is risky and probably add regressions.
Current config is know to work and I have no time to test this PR on each target to ensure it is correct.
Please revert to CSI the Nucleo H503RB config as the one you set is not correct.
I thought I had checked datasheets, but it seems I still didn't fully understand it. |
b393c0c
to
7968394
Compare
I've updated the PR. Honestly, anytime a new H5 board will be added the clock config will not be aligned with your reordering. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. No test performed.
I understood that code cleanup does not make much sense. |
Not agreed. I understand your point about diff but you changed some configurations for specific hardware which could bring some regressions. And as stated above cube mx does not follow this rules. Anyway any contributions are welcome. I'd like to have more contributions and hope to find new maintainers. Moreover some of your changes seems go to have a better configurations. 😉 |
Signed-off-by: dojyorin <[email protected]>
7968394
to
444d2e2
Compare
Summary
The generic clock config for STM32H5 series will be made as common as possible.
As a result, only differences will be the number of peripherals that vary by part number, clock source and peripherals used by each variant, etc.
We have also tidied up the writing style, such as commenting out.
This fixes
H503KBU
which was not included in #2598 fix.Common changes
USB
usesHSI48
H503
RCC_PERIPHCLK_ADCDAC
RCC_PERIPHCLK_LPUART1
RCC_PERIPHCLK_USB
RCC_PERIPHCLK_SPI1
RCC_PERIPHCLK_SPI2
RCC_PERIPHCLK_SPI3
H562
H563
H573
SDMMC1
operates at 50MHz.RCC_PERIPHCLK_SDMMC1
RCC_PERIPHCLK_ADCDAC
RCC_PERIPHCLK_LPUART1
RCC_PERIPHCLK_USB
RCC_PERIPHCLK_SPI1
RCC_PERIPHCLK_SPI2
RCC_PERIPHCLK_SPI3
RCC_PERIPHCLK_SPI4
RCC_PERIPHCLK_SPI5
RCC_PERIPHCLK_SPI6
RCC_PERIPHCLK_SPI4
andRCC_PERIPHCLK_SPI5
is only for models with high pin count.Variant-specific changes
H503CB(T-U)
H503KBU
PLL1Q
value has been made consistent withH503CB(T-U)
andH503RBT
values.H503RBT
NUCLEO_H503RB
H503RBT
.H562R(G-I)T
PLL2R
andUSB
value has been made consistent withH563R(G-I)T
,H563IIKxQ_H573IIKxQ
andH563Z(G-I)T
values.WEACT_H562RG
H562R(G-I)T
.H563IIKxQ_H573IIKxQ
OSPI
removed.STM32H573I_DK
H563IIKxQ_H573IIKxQ
.SAI
is enabled, I have not touchedPLL2
multiplex.H563R(G-I)T
PLL2R
andSDMMC1
value has been made consistent withH562R(G-I)T
,H563IIKxQ_H573IIKxQ
andH563Z(G-I)T
values.H563Z(G-I)T
SDMMC1
value has been made consistent withH562R(G-I)T
,H563IIKxQ_H573IIKxQ
andH563R(G-I)T
values.NUCLEO_H563ZI
H563Z(G-I)T
.H563Z(G-I)T
.